﻿<UserControl xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  x:Class="LightingPlatform.View.Level3.LightingListView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    <controlsToolkit:BusyIndicator x:Name="busy">
        <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"  BorderBrush="Transparent" BorderThickness="0" IsTabStop="False" TabNavigation="Once" Padding="0" Margin="0">
            <Grid x:Name="LayoutRoot" Background="White" Margin="20,5, 20, 20" >
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid x:Name="TitleGrid"/>
                <sdk:DataGrid Grid.Row="1" HeadersVisibility="None" BorderThickness="0" GridLinesVisibility="Horizontal" HorizontalAlignment="Left" RowHeight="65" IsReadOnly="True" ColumnHeaderHeight="23" AutoGenerateColumns="False" VerticalAlignment="Stretch" x:Name="DataGrid">
                    <sdk:DataGrid.Columns>
                        <sdk:DataGridTemplateColumn Header="产品图片"  Width="75">
                            <sdk:DataGridTemplateColumn.CellTemplate>
                                <DataTemplate>
                                    <Viewbox Height="70" Width="70" VerticalAlignment="Center" HorizontalAlignment="Center">
                                        <Image Source="{Binding Picture.FacadeView}"/>
                                    </Viewbox>
                                </DataTemplate>
                            </sdk:DataGridTemplateColumn.CellTemplate>
                        </sdk:DataGridTemplateColumn>

                        <sdk:DataGridTextColumn Header="产品系列" Binding="{Binding Series}" Width="75"/>
                        <sdk:DataGridTextColumn Header="产品分类" Binding="{Binding ClassView}" Width="75"/>
                        <sdk:DataGridTextColumn Header="规格型号" Binding="{Binding Version}" Width="75"/>
                        <sdk:DataGridTextColumn Header="产品品牌" Binding="{Binding Lable}" Width="75"/>
                        <sdk:DataGridTextColumn Header="外形尺寸" Binding="{Binding Physical.Size}" Width="220"/>
                        <sdk:DataGridTextColumn Header="光源种类" Binding="{Binding AdapterLighting.ClassView}" Width="75"/>
                        <sdk:DataGridTextColumn Header="光源功率" Binding="{Binding Electric.LightingPower}" Width="75"/>
                        <sdk:DataGridTextColumn Header="光源色温" Binding="{Binding AdapterLighting.Color}" Width="75"/>
                        <sdk:DataGridTextColumn Header="显色性" Binding="{Binding AdapterLighting.Cri}" Width="75"/>
                        <sdk:DataGridTextColumn Header="光束角" Binding="{Binding Optics.Angle, StringFormat='\{0\}°'}" Width="75"/>
                        <sdk:DataGridTextColumn Header="市场参考价" Binding="{Binding Business.Market, StringFormat='\{0\}RMB'}" Width="85"/>
                    </sdk:DataGrid.Columns>
                </sdk:DataGrid>
            </Grid>
        </ScrollViewer>
    </controlsToolkit:BusyIndicator>
</UserControl>
